/*
* @Author: bin
* @Date:   2016-07-15 01:03:47
* @Last Modified by:   bin
* @Last Modified time: 2016-08-01 22:12:33
*/

'use strict';
var express = require('express');
var app = express();
var session = require('express-session');

app.use(session({
  secret: 'keyboard cat',
  resave: false,
  saveUninitialized: true
}));

app.set('view engine','ejs');
var router = require('./controller');
app.use(express.static('./public'));
app.use('/avatar',express.static('./avatar'));
app.get('/actupian',router.showAcTuPian);

app.get('/heart',router.showIndex);
app.get('/regist',router.showRegist);
app.post('/doregist',router.doRegist);
app.get('/login',router.showLogin);
app.post('/dologin',router.doLogin);
app.get('/setavatar',router.showSetavater);
app.post('/dosetavatar',router.doSetavater);
app.get('/cut',router.showCut);
app.get('/docut',router.docut);
app.post('/post',router.doPost);
app.get('/getallwish',router.getAllWish);
app.get('/getuserinfo',router.getuserinfo);
app.get('/wishamount',router.wishamount);
app.get('/user/:username',router.showUser);
app.get('/userlist',router.showuserlist);
app.listen(3000);
